Skip to content
This repository has been archived by the owner on Jan 14, 2022. It is now read-only.

Fontawesome Update - Closes #839 #840

Merged
merged 8 commits into from
Dec 10, 2018
Merged

Conversation

youxiberlin
Copy link
Contributor

What was the problem?

Fontawesome v4 didn't support some icons we wanted to display. So needed to upgrade it to v5.

How did I fix it?

  • Added shims in the html header, and updated content security policy.
  • Modified CSS for pseudo element.

How to test it?

Review checklist

Copy link
Contributor

@MichalTuleja MichalTuleja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All is fine, only the placement of CSS can be done better way in order to keep project consistency.

src/index.ejs Outdated
<% if (htmlWebpackPlugin.options.serviceName && htmlWebpackPlugin.options.clientId) { %>
<meta name="<%= htmlWebpackPlugin.options.serviceName %>" content="<%= htmlWebpackPlugin.options.clientId %>">
<% } %>

<!--<link rel="stylesheet" href="/css/main.min.css">-->
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.5.0/css/all.css">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of using the <link> tag, the main CSS and the shim file can be imported directly in the src/app/app.js, in the styles section.

Copy link
Contributor

@MichalTuleja MichalTuleja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added one remark - everything else is fine.

app.js Outdated
`font-src 'self' https://fonts.gstatic.com data:`,
`style-src 'self' 'unsafe-inline' https://fonts.googleapis.com https://use.fontawesome.com/;`,
`script-src 'self' 'unsafe-eval' 'unsafe-inline' https://tagmanager.google.com/ https://www.googletagmanager.com/ https://www.google-analytics.com/ https://dnn506yrbagrg.cloudfront.net/ https://*.ipify.org/ https://*.crazyegg.com/ http://trk.cetrk.com/ https://s3.amazonaws.com/trk.cetrk.com/ https://use.fontawesome.com/;`,
`font-src 'self' https://fonts.gstatic.com https://use.fontawesome.com/;`,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

font-awesome references can be removed from the security policy

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants